function showWinTeeTime(){
	Ext.define('mdNtTeeTime', {
		extend: 'Ext.data.Model',
		fields: ['ID', 'TEE_START', 'PLAYER_ID', 'PLAYER', 'GOLF_COURSE_ID', 'NAME_GOLF_COURSE', 'DATE_START', 'TIME_START','DATE_TIME_START', 'LIVE_SCORE_ID' ]
	});
	var strNtTeeTime = new Ext.create('Ext.data.Store', {
		autoLoad : true,
		model: 'mdNtTeeTime',
		groupField: 'DATE_START',
		pageSize: 20,
		proxy: {
			type: 'ajax',
			url: base_url+'/NtTeeTime/NtTeeTimeCrud/GetAllNtTeeTime',
			method: 'POST',
			reader: {
					type : 'json',
					root : 'rows',
					totalProperty  : 'results'
				}
		}

	});
	function searchResultQAdd(){
			Ext.getCmp('gridNtTeeTime').body.mask('Loading Data... ','x-mask-loading');
				strNtTeeTime.proxy.extraParams = { query:Ext.getCmp('srcTxtNtTeeTime').getValue()}; //SET STORE EXTRA PARAMS FOR SEND PARAMATER USING AJAX
				strNtTeeTime.load(); // LOAD STORE DEFAULT FUNCTION BUT, BASE ON EXTRA PARAMS IN CODE UP THERE  
				strNtTeeTime.on("load", function() {
				Ext.getCmp('gridNtTeeTime').body.unmask();
			});
		}    
	var bar = {
				xtype           : 'textfield',
				labelSeparator  : '',
				id              : 'srcTxtNtTeeTime',
				emptyText		: 'Search...',
				enableKeyEvents : true,
				width           : 200,
				listeners       : {
						keypress : function(th,e){
								if(e.keyCode == 13){
										searchResultQAdd();
								}
						}
				}
		}
	var gridNtTeeTime = new Ext.create('Ext.grid.Panel', {
		id:'gridNtTeeTime',
		// frame: true, 
		columnLines: true,
		region:'center',
		border: false, 
		store: strNtTeeTime,
		features: [{
			ftype: 'groupingsummary',
		}],	
		height: '100%',
		width: '100%',
		region:"center",
		forceFit: true,
		columns: [{xtype: 'rownumberer'},
				 {
					header: 'Player',
					dataIndex: 'PLAYER',
					summaryType: 'count',
					summaryRenderer: function(value, summaryData, dataIndex) {
						return ((value === 0 || value > 1) ? '<b>' + value + ' Player</b>' : '<b>1 Player</b>');
					}
				},{
					header: 'Golf Course',
					dataIndex: 'NAME_GOLF_COURSE',
				},{
					header: 'Tee Start',
					dataIndex: 'DATE_TIME_START',
				}
		 ],
		 dockedItems: [{
			xtype: 'toolbar',
			items: [
						'Search : ',bar
					],
		}],
		bbar: {
			xtype: 'pagingtoolbar',
			pageSize: 20,
			store: strNtTeeTime,
			displayInfo: true,
			plugins: new Ext.ux.ProgressBarPager()
		},
		listeners:{
			'itemdblclick': function(dv, record, item, index, e) {
				Ext.getCmp('saveScore').enable();
				Ext.getBody().mask('Loading Setting '+text+'....','x-mask-loading');
				rec = gridNtTeeTime.getSelectionModel().getSelection()[0];
				Ext.getCmp('id_grdTxtPlayer').setValue(rec.get('PLAYER_ID'));
				Ext.getCmp('id_grdTxtTeeTime').setValue(rec.get('ID'));
				Ext.getCmp('grdTxtPlayer').setValue(rec.get('PLAYER'));
				Ext.getCmp('grdTxtTeeTime').setValue(rec.get('DATE_TIME_START'));
				
				Ext.Ajax.request({
					url:  base_url+'/NtLiveScore/NtLiveScoreCrud/GetAllNtLiveScore',
					params: {
						id_teetime : rec.get('ID')
					},
					method:'POST',
					success: function(response){
						var data = Ext.decode(response.responseText);
						var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', {
							clicksToEdit: 2
						});
						var cellEditing2 = Ext.create('Ext.grid.plugin.CellEditing', {
							clicksToEdit: 2
						});
						store1 = Ext.create('Ext.data.ArrayStore', {
							fields: data.fielddata,
							data: data.values
						});
						
						grid1 = Ext.create('Ext.grid.Panel', {
							store		: store1,
							columnLines: true,
							plugins		: [Ext.create('Ext.grid.plugin.CellEditing', {
								clicksToEdit: 2,
								listeners: {
									beforeedit: function(e, editor){
										getSelectedRowIndex =  function(grid){
											  var r = grid.getSelectionModel().getSelection();
											  var s = grid.getStore();
											  return s.indexOf(r[0]);
											}

										var rowIndex = getSelectedRowIndex(grid1);
										if (rowIndex== 0)
											return false;
									}
								}
							})],
							columns		: data.columndata,
							region: 'center',
							stripeRows	: true,
							height		:'100%',
							width		:'100%',
						});
						
						store2 = Ext.create('Ext.data.ArrayStore', {
							fields: data.fielddata2,
							data: data.values2
						});
						
						grid2 = Ext.create('Ext.grid.Panel', {
							store		: store2,
							columnLines: true,
							plugins		: [Ext.create('Ext.grid.plugin.CellEditing', {
								clicksToEdit: 2,
								listeners: {
									beforeedit: function(e, editor){
										getSelectedRowIndex =  function(grid){
											  var r = grid.getSelectionModel().getSelection();
											  var s = grid.getStore();
											  return s.indexOf(r[0]);
											}

										var rowIndex = getSelectedRowIndex(grid2);
										if (rowIndex== 0)
											return false;
									}
								}
							})],
							columns		: data.columndata2,
							region		: 'center',
							stripeRows	: true,
							height		:'100%',
							width		:'100%',
						});
						Ext.getCmp('r1').removeAll();
						Ext.getCmp('r2').removeAll();
						
						Ext.getCmp('r1').add(grid1);
						Ext.getCmp('r2').add(grid2);
					},
					callback: function() {
						Ext.getBody().unmask();
					} 
				});
				winTeeTime.close();
			}
		}

	});
	
	var winTeeTime = new Ext.create('widget.window', {
                title		: 'Golf Course Search',
				width       : 600,
				autoHeight  : true,
				resizable   : false,
				modal       : true,
				id			:'winTeeTime',
				listeners:{
					'close':function(){document.body.removeChild(document.getElementById("winTeeTime"));}
				},
                items: [gridNtTeeTime]
            });
	winTeeTime.show();
}